import axios from "axios";
const server=axios.create({
    baseURL:process.env.VUE_APP_BASE_URL,
    timeout:10000
})
server.interceptors.request.use((config)=>{
    return config
},(err)=>{
    return Promise.reject(err)
})
server.interceptors.response.use((response)=>{
    return response.data
},(err)=>{
    if(err.response.status){
        switch(err.response.status){
            case 404:
                break;
            case 400:
                break;
            case 401:
                break;
            case 500:
                break;
        }
    }
    return Promise.reject(err)
})
export default server

